import java.util.Scanner;

public class task3 {

	public static void main(String[] args) {
		int value , x;
		
		Scanner scanner = new Scanner(System.in);
		
		do {
			
			System.out.print("Enter an integer >=1:");
			value = scanner.nextInt();
			
			if(value <= 0)
				System.out.println("Error: Invalid input !");

		}while(value <= 0);
		
		System.out.printf("The integer entered is %d, its revers is:",value);
		x = value;
		while(x > 0)
		{
			System.out.print(x%10);
			x = x/10;
		}
		
		scanner.close();
	}

}
